"""
异常的传递性
"""

def func1():
    print("执行func1")
    a = 1/0
    print("结束func1")
def func2():
    print("执行func2")
    func1()
    print("结束func2")

def main():
    try:
        print("执行main")
        func2()
        print("结束main")
    except Exception as e:
        print(f"捕获到了异常，异常的信息是：{e}")
    else:
        print("没有异常出现")

main()